<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template/DefaultTemplate.xhtml">
        <ui:define name="top">

        </ui:define>

        <ui:define name="left">

        </ui:define>
        <ui:define name="content">


  <h:form>  
  
    <p:dataTable var="vpp" value="#{vendorEntityController.vpps}" > 

        <f:facet name="header" >  
       You can edit your price here
        </f:facet>  
  
        <p:column headerText="RawMaterial" style="width:150px">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{vpp.rawMaterial.productName}" />  
                </f:facet>  
                <f:facet name="input">  
                  <h:selectOneMenu value="#{vpp.rawMaterial.productName}" >  
                        <f:selectItems value="#{vendorEntityController.rawMaterials}"  
                            var="man"   
                            itemLabel="#{man}"  
                            itemValue="#{man}" />  
                    </h:selectOneMenu>  
                </f:facet>  
            </p:cellEditor>  
        </p:column>  
  
        <p:column headerText="Price" style="width:150px">  
            <p:cellEditor>  
                <f:facet name="output">  
                    <h:outputText value="#{vpp.unitPrice}" />  
                </f:facet>  
                <f:facet name="input">  
                    <p:inputText value="#{vpp.unitPrice}" style="width:100%"/>  
                </f:facet>  
            </p:cellEditor>  
        </p:column>  
  
        <p:column headerText="Options">  
            <p:rowEditor />  
        </p:column>  
  
    </p:dataTable>  
  <p:commandButton actionListener="#{vendorEntityController.update}" ajax="false" value="Confirm"/>
</h:form>  

        </ui:define>
    </ui:composition>



</html>